package org.ncibi.cytoscape.metscape.network;

import org.ncibi.cytoscape.metscape.data.Attributes;
import org.ncibi.metab.network.attribute.EnzymeReactionAttribute;
import org.ncibi.metab.network.edge.EnzymeReactionEdge;
import org.ncibi.metab.network.edge.MetabolicEdge;

public class EnzymeReactionEdgeTranslator extends AbstractEdgeTranslator
{
	
	@Override
    protected String getInteraction(MetabolicEdge edge)
    {
        return EnzymeReactionEdge.getEnzymeReactionEdgeAttribute(edge, EnzymeReactionAttribute.ECNUMS) + " - " +
        	EnzymeReactionEdge.getEnzymeReactionEdgeAttribute(edge, EnzymeReactionAttribute.RIDS);
    }

    @Override
    protected void addEdgeAttributes(String id, MetabolicEdge edge)
    {
    	Attributes.edge.setListAttribute(id, EnzymeReactionAttribute.ECNUMS.toAttributeName(),
        		EnzymeReactionEdge.getEcnums(edge));
    	Attributes.edge.setListAttribute(id, EnzymeReactionAttribute.NAMES.toAttributeName(),
        		EnzymeReactionEdge.getNames(edge));
    	Attributes.edge.setListAttribute(id, EnzymeReactionAttribute.RIDS.toAttributeName(),
    			EnzymeReactionEdge.getRids(edge));
    	Attributes.edge.setListAttribute(id, EnzymeReactionAttribute.PATHWAYS.toAttributeName(),
    			EnzymeReactionEdge.getPathways(edge));
    }

}
